<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ include file="/sys/include/header.jsp" %>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>维护店面</title>
<link href="sys/style01/css/table.css" rel="stylesheet" type="text/css">
<link href="sys/css/banzu.css" rel="stylesheet" type="text/css"  >
</head>
<body class="ridgeBody" >
<script language="javascript">
	
function doDelete(emp_id){
   
		if (confirm("是否确认删除？删除后数据不可见！")){
			document.queryFrom.action = "hr/areaRTMDeleteDo.action?emp_id="+ emp_id;
			document.queryFrom.submit();
		}else { 
		  return false;
		 }
	}

function back(){
	window.queryFrom.action = "hr/areaRTMSearchInit.action";
	window.queryFrom.submit();
}

function add(emp_id){
	document.queryFrom.action = "hr/areaRTMAddInit.action?emp_id="+emp_id;
	document.queryFrom.submit();
}

function selectAll(){
	var chk = document.getElementsByName("area_rtm_id");
	if(document.all.selectAll.innerHTML == '全选'){
		document.all.selectAll.innerHTML = "全否";
		for(var i=0;i<chk.length;i++)
			chk[i].checked=true;
	}else{
		document.all.selectAll.innerHTML = "全选";
		for(var i=0;i<chk.length;i++)
			chk[i].checked=false;
	}
}

</script>

<table width="100%" >
<tr><td> 
 <form name="queryFrom" method="post" action=""> 
 	<input name="curpage" type="hidden" class="input" value="1">
	<input name="emp_id" type="hidden" class="input">
</td></tr> <tr ><td width="100%"  >
<table width="100%" cellpadding='0' cellspacing='0' border='1' bordercolorDark='white' bordercolorLight='#BEBEBE' class="datatable">
	<tr>
		<td nowrap="nowrap" class="dataTitle" >
		 	<span style="cursor:hand;textDecoration:underline" id="selectAll"  onclick="selectAll()">全选</span>
		 </td>
		<td height="22" nowrap class="dataTitle" align="center">&nbsp;区域编码&nbsp;</td>
		<td height="22" nowrap class="dataTitle" align="center">&nbsp;区域名称&nbsp;</td>
	</tr>
	<c:forEach items="${pageBean.map}" var="map">
	<tr class="datatr" align="center" onMouseOver=this.className='udatatr' onMouseOut=this.className='datatr'>
		 <td   nowrap="nowrap" class="Table_str" align="center" >
		 <input type="checkbox" name="area_rtm_id" value="${map.area_rtm_id}">
		 </td> 
		 <td nowrap="nowrap" class="Table_str" >${map.area_code}&nbsp;</td>
		  <td nowrap="nowrap" class="Table_str" >${map.area_value}&nbsp;</td>	 
	</tr>
	</c:forEach>
	<c:if test="${pageBean.page.rowTotal>0}">
	<tr>
		<td height="20" colspan="9">
			<jsp:include page="/sys/include/page.jsp" flush="true"/> 
		</td>
	</tr>
	</c:if> 
 </table>

 </td></tr>	

</table>

<table width="100%" bgcolor="#96BDDA">
<tr>
<td height="20" colspan="6" valign="top" class="dataTitle">
<input type="button"  onClick="add('${emp_id}')" value="增加">
<input type="button"  onClick="doDelete('${emp_id}')" value="删除">
<input type="button"  onClick="back()" value="返回"></td>
</tr> 
</table>
</body>
</html>
